Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path #2

Merged
merged 14 commits into from May 9, 2024
Merged

Path #2

merged 14 commits into from May 9, 2024

Conversation

ericgaspar
Copy link
Member

No description provided.

@ericgaspar
Copy link
Member Author

!testme

@yunohost-bot
Copy link
Contributor

Alrighty!
Test Badge

@ericgaspar
Copy link
Member Author

!testme

@yunohost-bot
Copy link
Contributor

Meow 🐈
Test Badge

@silverhook
Copy link

Will this patch fix the issue where BorgWarehouse does not want to create a repo because it is missing ~/.ssh/authorized_keys?

@ericgaspar
Copy link
Member Author

!testme

@yunohost-bot
Copy link
Contributor

Alrighty!
Test Badge

@ericgaspar
Copy link
Member Author

Will this patch fix the issue where BorgWarehouse does not want to create a repo because it is missing ~/.ssh/authorized_keys?

This PR needs to be tested

@silverhook
Copy link

@ericgaspar, can I help in any way?

@ericgaspar
Copy link
Member Author

if you are willing to test it will help 👍

@silverhook
Copy link

If you can walk me through what I should do, happy to.

(I’m new to YunoHost, but not new to Linux)

@silverhook
Copy link

@ericgaspar , if you release a testing version on YunoHost, I’d be glad to take it for a spin and report my experience.

@ericgaspar
Copy link
Member Author

You can test (install or upgrade) this branch with this commands in a terminal

sudo yunohost app install https://github.com/YunoHost-Apps/borgwarehouse_ynh/tree/path
or
sudo yunohost app upgrade borgwarehouse -u https://github.com/YunoHost-Apps/borgwarehouse_ynh/tree/path --force

@silverhook
Copy link

silverhook commented Dec 29, 2023

Thanks, @ericgaspar ,

If I just force upgrade and restart the service, I still get this error when trying to add a repository:

An error has occurred : /home/borgwarehouse/.ssh/authorized_keys must be present

But if I remove the app and (re-)install it, it seems to work now.

touch $install_dir/.ssh/authorized_keys && chmod 600 $install_dir/.ssh/authorized_keys
mkdir /home/$app
mkdir /home/$app/.ssh && chmod 700 /home/$app/.ssh
touch /home/$app/.ssh/authorized_keys && chmod 600 /home/$app/.ssh/authorized_keys

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps add these also to script/upgrade

@silverhook
Copy link

OK, I am running into another problem: I can create backup repos, but cannot seem to access them.

If I try to borg init a repo from my laptop that I created using BorgWarehouse@YunoHost, I get the following error:

borgwarehouse@{$domain}'s password: Remote: Permission denied, please try again.

I have no idea which password it wants from me.

I also tried to import the repository from my old borg server, but it does not seem to show up as used space in the dashboard.

That brings me to the question where does BorgWarehouse on YunoHost expect the repos/ to be?

BTW, I don’t know if this affects anything, but even though there is /home/borgwarehouse/, borgwarehouse’s home directory is still set to /var/www/borgwarehouse/.

@silverhook
Copy link

I tried again to init a backup repository with borg init --debug -e repokey-blake2 […] and I get:

sing builtin fallback logging configuration
33 self tests completed in 0.04 seconds
SSH command line: ['ssh', '-p', '22', '{redacted}', 'borg', 'serve', '--debug']
Remote: ssh: connect to host {redacted} port 22: Connection refused
Connection closed by remote host. Is borg working on the server?
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/borg/archiver.py", line 5343, in main
    exit_code = archiver.run(args)
                ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/borg/archiver.py", line 5263, in run
    return set_ec(func(args))
                  ^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/borg/archiver.py", line 167, in wrapper
    repository = RemoteRepository(location.omit_archive(), create=create, exclusive=argument(args, exclusive),
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/borg/remote.py", line 578, in __init__
    raise ConnectionClosedWithHint('Is borg working on the server?') from None
borg.remote.ConnectionClosedWithHint: Connection closed by remote host. Is borg working on the server?

Platform: Linux leza 6.6.8-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Thu, 21 Dec 2023 19:00:41 +0000 x86_64
Linux: Unknown Linux  
Borg: 1.2.7  Python: CPython 3.11.6 msgpack: 1.0.5 fuse: llfuse 1.5.0 [pyfuse3,llfuse]
PID: 239375  CWD: /home/hook
sys.argv: ['/usr/bin/borg', 'init', '--debug', '-e', 'repokey-blake2', 'ssh://borgwarehouse@{redacted}']
SSH_ORIGINAL_COMMAND: None

@silverhook
Copy link

@ericgaspar , anything else I can help with?

I’m interested to getting this fixed, as migrating my Borg backups to YuNoHost is the last thing keeping my noisy old server(s) running.

@silverhook
Copy link

I poked around a bit and it seems to be a permission (and folder location) issue.

@Limezy
Copy link
Collaborator

Limezy commented May 1, 2024

@ericgaspar would you mind giving me the rights on this repo ?
I need to use borgwarehouse so I'll solve the issues first

@Limezy
Copy link
Collaborator

Limezy commented May 1, 2024

!testme

@yunohost-bot
Copy link
Contributor

May the CI gods be with you!
Test Badge

@yunohost-bot
Copy link
Contributor

📚
Test Badge

@Limezy
Copy link
Collaborator

Limezy commented May 9, 2024

superseded by #13 after a rebase of these commits

@ericgaspar ericgaspar merged commit edfe0a8 into testing May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants